package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LuntaiUserMapper;
import com.ruoyi.system.domain.LuntaiUser;
import com.ruoyi.system.service.ILuntaiUserService;

/**
 * 用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-17
 */
@Service
public class LuntaiUserServiceImpl implements ILuntaiUserService 
{
    @Autowired
    private LuntaiUserMapper luntaiUserMapper;

    /**
     * 查询用户
     * 
     * @param id 用户主键
     * @return 用户
     */
    @Override
    public LuntaiUser selectLuntaiUserById(Integer id)
    {
        return luntaiUserMapper.selectLuntaiUserById(id);
    }

    /**
     * 查询用户列表
     * 
     * @param luntaiUser 用户
     * @return 用户
     */
    @Override
    public List<LuntaiUser> selectLuntaiUserList(LuntaiUser luntaiUser)
    {
        return luntaiUserMapper.selectLuntaiUserList(luntaiUser);
    }

    /**
     * 新增用户
     * 
     * @param luntaiUser 用户
     * @return 结果
     */
    @Override
    public int insertLuntaiUser(LuntaiUser luntaiUser)
    {
        luntaiUser.setCreateTime(DateUtils.getNowDate());
        return luntaiUserMapper.insertLuntaiUser(luntaiUser);
    }

    /**
     * 修改用户
     * 
     * @param luntaiUser 用户
     * @return 结果
     */
    @Override
    public int updateLuntaiUser(LuntaiUser luntaiUser)
    {
        return luntaiUserMapper.updateLuntaiUser(luntaiUser);
    }

    /**
     * 批量删除用户
     * 
     * @param ids 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteLuntaiUserByIds(Integer[] ids)
    {
        return luntaiUserMapper.deleteLuntaiUserByIds(ids);
    }

    /**
     * 删除用户信息
     * 
     * @param id 用户主键
     * @return 结果
     */
    @Override
    public int deleteLuntaiUserById(Integer id)
    {
        return luntaiUserMapper.deleteLuntaiUserById(id);
    }
}
